from typing import TypeVar

from sqlalchemy.orm import Mapped, mapped_column, relationship

from recruit.adapter.database.models.base import AbstractResume

Resume = TypeVar('Resume')


class ResumePosition(AbstractResume):
    """ Model ResumePosition. """
    position: Mapped[str] = mapped_column(comment='Желаемая должность')
    employment: Mapped[str] = mapped_column(comment='Занятость')
    work_schedule: Mapped[str] = mapped_column(comment='График работы')
    resume: Mapped['Resume'] = relationship(
        back_populates='resume_position',
        lazy='selectin'
    )
